// import Vuex from 'vuex'
// import Vue from 'vue'
// // 导入模块
// import user from './modules/user'
// import setting from './modules/setting'

// Vue.use(Vuex)

// const store = new Vuex.Store({
//     state: {
//     },
//     getters: {
//     },
//     mutations: {
//     },
//     // 执行异步操作
//     actions: {
//     },
//     modules: {
//         //模块名:{配置对象}
//         user: user,
//         setting: setting
//     }
// })

// export default store

import Vue from "vue";
import Vuex from "vuex";
// 导入模块
import user from "./modules/user";
import setting from "./modules/setting";
import getters from "./getters";

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {},
  getters,
  mutations: {},
  actions: {},
  // 子模块
  modules: {
    user,
    setting,
  },
});

export default store;
